class Rectangle implements IShape {
    Point ptTopLeft;
    Point ptTopRight;
    int width;
    int height;

    public Rectangle() {
        this.ptTopLeft = new Point();
        this.width = 0;
        this.height = 0;
        this.ptTopRight = new Point(ptTopLeft.x + width, ptTopLeft.y);
    }

    public Rectangle(Point topleft, int height, int width) {
        this.ptTopLeft = new Point(topleft);
        this.width = width;
        this.height = height;
        this.ptTopRight = new Point(ptTopLeft.x + width, ptTopLeft.y);
    }

    @Override
    public double perimeter() {
        return 2 * (width + height);
    }

    @Override
    public double area() {
        return width * height;
    }

    @Override
    public void draw() {
        System.out.println("绘制一个矩形，左上角坐标: (" + ptTopLeft.x + ", " + ptTopLeft.y + "), 宽度: " + width + ", 高度: " + height);
    }
}